package com.marvels.system.permission.service;

import java.util.List;

import com.marvels.common.exception.MarvelsBusinessException;
import com.marvels.system.permission.dto.SysOrgDTO;
import com.marvels.system.permission.dto.SysPositionDTO;

public interface PositionService {
	/**
	 * 根据组织代码获取岗位树
	 * @param org
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public List<SysPositionDTO> getPositionsByOrgCode(SysOrgDTO org) throws MarvelsBusinessException;
	
	/**
	 * 获取岗位详情
	 * @param org
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public SysPositionDTO getPositionById(SysPositionDTO org) throws MarvelsBusinessException;
	
	/**
	 * 新增岗位子节点
	 * @param position
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public SysPositionDTO addPosition(SysPositionDTO position) throws MarvelsBusinessException;
	
	/**
	 * 新增岗位根节点
	 * @param position
	 * @return
	 * @throws MarvelsBusinessException
	 */
	SysPositionDTO addRootPosition(SysPositionDTO position) throws MarvelsBusinessException;
	
	/**
	 * 更新岗位
	 * @param position
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public int updatePositionById(SysPositionDTO position) throws MarvelsBusinessException;
	
	/**
	 * 删除岗位
	 * @param position
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public int deletePositionById(SysPositionDTO position) throws MarvelsBusinessException;

	
}
